package eirkdbd.lab1.membership.functions;

import eirkdbd.lab1.data.Team;
import eirkdbd.lab1.membership.MembershipFunction;
import eirkdbd.lab1.membership.functions.helpers.LinearMembershipFunction;


/**
 * NotGoalscoring is team unskilfulness to score goals 
 *
 */
class NotGoalscoring implements MembershipFunction {
	
	private final double maxX = 17.;
	private final double minX = 30.;
	private LinearMembershipFunction lmf;
	
	public NotGoalscoring() {
		lmf = new LinearMembershipFunction(minX, maxX);
	}

	/**
	 * Returns degree of membership to notGoalscoring team group
	 */
	public double getValue(Team team) {
		return lmf.value(team.getGoals());
	}

}
